<?php
// require_once 'KLogger.php';
require_once 'barang.php';
class Barangs {
	var $log;
// 	var $barangs[];

	function __construct() {
	}

	function get() {
		return $this->populateBarangsXml();
	}
	
	function get($id=null) {
		
	}

	private function populateBarangsXml() {
		//ambil database barang, terus masukin ke array barang
		$document = new DOMDocument('1.0', 'UTF-8');
		$elementBarangs = $document->createElement('barangs');
		foreach($items as $item) {
			$barang = new BarangModel();
			$barang.setPropertiesFromValue('field1','field1','field1','field1','field1','field1','field1');
// 			$barangs[] = $barang;
		}
		
		return $document->saveXml();
	}
}
